package com.hevery.warpper;

import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;

/**
 * @Author: Hevery
 * @Description:
 * @Date: Created on 2017/10/8
 * @Modified By:
 */
public class ServletInputStreamCopier extends ServletInputStream{
    private ByteArrayInputStream bais;

    public ServletInputStreamCopier( ByteArrayInputStream bais) {
        this.bais = bais;
    }


    @Override
    public int read() throws IOException {
        return bais.read();
    }

    @Override
    public boolean isFinished() {
        return false;
    }

    @Override
    public boolean isReady() {
        return false;
    }

    @Override
    public void setReadListener(ReadListener readListener) {

    }
}
